﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Core.Messages
{    
    public class QueryResponse<T>
    {
        public QueryResponse()
        {            
        }
        
        public IList<T> List { get; set; }

        public int PageNumber { get; set; }

        public int PageSize { get; set; }

        public int PageCount
        {
            get
            {
                if (PageSize == 0) return 0;
                return (int)Math.Ceiling((decimal)TotalItemCount/ PageSize);
            }
            internal set { }
        }

        public int TotalItemCount { get; set; }
    }
}
